package com.example.kaogong.sys.mapper;

import com.example.kaogong.sys.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 用户 Mapper 接口
 * </p>
 *
 * @author    
 * @since 2022-03-26
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Update({"update t_user set deleted = 1 where uid = #{uid}"})
    Integer deleteUserByUid(Integer uid);

    @Update({"update t_user set user_img = #{fileName} where username = #{name}"})
    int updateUserAvatar(@Param("fileName") String fileName, @Param("name") String name);
}
